﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace CeremonyBackground.Models
{
    /// <summary>
    /// 朋友圈
    /// </summary>
    public class WechatMoment
    {
        /// <summary>
        /// Id
        /// </summary>
        public int Id { get; set; }
        /// <summary>
        /// 顶置顺序
        /// </summary>
        public int? OverheadOrder { get; set; }
        /// <summary>
        /// 用户Id
        /// </summary>
        public int UserId { get; set; }
        /// <summary>
        /// 发布的消息
        /// </summary>
        public string Message { get; set; }
        /// <summary>
        /// 发布的照片名称(唯一)
        /// </summary>
        public string ImageNames { get; set; }
        /// <summary>
        /// 是否删除
        /// </summary>
        public bool IsRemove { get; set; }
        /// <summary>
        /// 删除时间
        /// </summary>
        public DateTime? RemoveTime { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreateTime { get; set; }

        public WechatMoment(int? overheadOrder, int userId,string message,string imageNames)
        {
            this.OverheadOrder = overheadOrder;
            this.UserId = userId;
            this.Message = message;
            this.ImageNames = imageNames;
            this.CreateTime = DateTime.Now;
            this.IsRemove = false;
        }
        public void Remove()
        {
            this.IsRemove = true;
            this.RemoveTime = DateTime.Now;
        }
    }
}
